<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="bb" class="weaver.general.BaseBean"/>
<%
    JSONObject jsonData = new JSONObject();
    boolean flag = true;
    String id = Util.null2String( request.getParameter( "id" ) );
    String shfs = Util.null2String( request.getParameter( "shfs" ) );//送货方式
    String shdh = Util.null2String( request.getParameter( "shdh" ) );//送货单号
    int shsl = Util.getIntValue( request.getParameter( "shsl" ) );//送货数量
    String newfhxx = "送货方式：" + shfs + ",送货单号:" + shdh + ",送货数量:" + shsl;
    String updateSql = "update uf_fybx set shfs=?,shdh=?,shsl=?,bz=? where id=?";
    rs.executeQuery( "select id,shsl,bz from uf_fybx where id =?", id );
    rs.next();
    int shsl1 = Util.getIntValue( rs.getString( "shsl" ) );
    String fhxx = Util.null2String( rs.getString( "bz" ) );
    int newfhsl = shsl1 + shsl;
    //fhxx = "".equals( fhxx ) ? newfhxx : fhxx + ";" + newfhxx;
    flag = rs.executeUpdate( updateSql, shfs, shdh,newfhsl,newfhxx, id );
    jsonData.put( "flag", flag );
    out.print( jsonData.toJSONString() );
%>
